#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int sum = 1;
string s, ans = "NO";
void solve() {
    cin >> s;
    for (auto c : s) {
        if (c == '-') sum--;
        else sum *= 2;
        if (sum >= 2025) {
            ans = "YES";
            break;
        }
    } cout << ans << '\n';
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int _ = 1;
    // std::cin >> _;
    while (_--) {
        solve();
    }
    return 0;
}

